package com.feilong.modules.dao.goods;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feilong.modules.model.goods.po.GoodsCategoryPO;
import com.feilong.modules.model.goods.vo.GoodsCategoryVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface GoodsCategoryDao extends BaseMapper<GoodsCategoryPO> {

    /**
     * 根据商品id获取商品所属分类
     * @param goodsId
     * @return
     */
    List<Integer> getGoodsCategoryId(Integer goodsId);

    /**
     * 根据商品分类id获取所有商品
     * @param categoryId
     * @return
     */
    List<GoodsCategoryVO> getCategoryDetail(Integer categoryId);
}
